#define _CRT_SECURE_NO_WARNINGS 1

#include <stdio.h>

int main()
{
	int a[1000];
	int n;
	scanf("%d", &n);
	for (int i = 0; i < n; i++) {
		scanf("%d", &a[i]);
	}
	int s;
	scanf("%d", &s);
	int num = 0;
	for (int i = 0; i < n; i++) {
		if (s == a[i]) {
			printf("%d", i + 1);
			num = 1;
			break;
		}

	}
	if (num != 1)printf("-1");
	return 0;
}